package com.jneagle.xlstool.bzwgjmx.impl.exception;

import com.dwarfeng.subgrade.stack.exception.HandlerException;

import java.io.File;

/**
 * 解析器无法决定异常。
 *
 * @author DwArFeng
 * @since 1.0.0
 */
public class ParserUnableDetermineException extends HandlerException {

    private static final long serialVersionUID = -735197823764476704L;

    private final File file;

    public ParserUnableDetermineException(File file) {
        this.file = file;
    }

    public ParserUnableDetermineException(Throwable cause, File file) {
        super(cause);
        this.file = file;
    }

    @Override
    public String getMessage() {
        return "无法为文件 " + file.getName() + " 决定合适的解析器";
    }
}
